<include file="public:header" />
<div class="allpagetop">系统设置<strong>/</strong>网站配置</div>
<div class="admin_main_nr_dbox">
<div class="pagetit">
	        <div class="ptit">系统设置</div>
				<include file="Config/topnav" /> 
	        <div class="clear"></div>
	    </div>
		
		
    <div class="toptit">网站配置</div>
  <form action="{:RU('config/edit')}" method="post"   name="FormData" id="FormData" >
	  <div class="admin_form_main">
	  
	    <div class="fl">网站名称:</div>
		<div class="fr"><input name="YTATA_SITE_NAME" type="text"  class="input_text_default" maxlength="60" placeholder="如：吉他郭问答系统" value="{$show.YTATA_SITE_NAME}"/></div>
		
		
		
		<div class="fl">网站域名:</div>
		<div class="fr">
		<input name="YTATA_SITE_DOMAIN" type="text"  class="input_text_default" maxlength="100" placeholder="如：http://www.d163.net" value="{$show.YTATA_SITE_DOMAIN}"/>
		</div>
	 

		<div class="fl">联系电话:</div>
		<div class="fr">
		<input name="YTATA_TEL" type="text"  class="input_text_default" maxlength="300" placeholder="网站联系电话" value="{$show.YTATA_TEL}"/>
		</div>
		
		<div class="fl">联系地址:</div>
		<div class="fr">
		<input name="YTATA_ADDRESS" type="text"  class="input_text_default" maxlength="300" placeholder="网站联系地址" value="{$show.YTATA_ADDRESS}"/>
		</div>
		
		<div class="fl">ICP备案号:</div>
		<div class="fr">
		<input name="YTATA_ICP" type="text"  class="input_text_default" maxlength="300" placeholder="输入ICP备案号，如：粤ICP备 123456789号" value="{$show.YTATA_ICP}"/>
		</div>
		<div class="fl">版权声明:</div>
		<div class="fr">
		<input name="YTATA_COPYRIGHT" type="text"  class="input_text_default" maxlength="300" placeholder="如：Copyright © 2019 d163.net" value="{$show.YTATA_COPYRIGHT}"/>
		</div>
		
		<div class="fl">统计代码:</div>
		<div class="fr">
		<input name="YTATA_STATISTICS" type="text"  class="input_text_default" maxlength="1000" placeholder="填写第三方统计代码" value="{$show.YTATA_STATISTICS}"/>
		</div>
		
		
		<div class="fl">网站logo:</div>
		<div class="fr" id="J_sitelogo">
			<input name="YTATA_SITE_LOGO" type="hidden" value="{$show.YTATA_SITE_LOGO}"  />
		
			<if condition="$show.YTATA_SITE_LOGO neq ''">
			
				<div class="input_up_img logo">
					<a href="{$show.YTATA_SITE_LOGO}" target="_blank">
						<img src="{$show.YTATA_SITE_LOGO}" border="0" />
					</a>
					<div class="del" id="J_sitelogo_del">删除</div>
				</div>
			
				<div class="input_up_btn logo" id="J_sitelogo_up" name="question_img" title="上传图片" style="display:none"></div>
				<div class="clear"></div>
			
				<else />
			
				<div class="input_up_btn logo" id="J_sitelogo_up" name="question_img" title="上传图片"></div>
				<div class="clear"></div>
		
			</if>
		</div>
		
		
		 
		
		 <div class="fl"></div>
		<div class="fr">
		<input name="" type="submit" class="admin_submit big"    value="保存配置"/>
		</div>
		
		
		
		<div class="clear"></div>
		
	  </div>
  
  
 
  
  
   
  </form>
</div>
<include file="public:footer" />
<script type="text/javascript">
    var uploadUrl = "{:U('Upload/img')}";  // 上传地址
</script>
<script src="__ROOT__/{:C('YTATA_ADMINTPL_DIR')}/public/js/ajaxfileupload.js"></script>
<script src="__ROOT__/{:C('YTATA_ADMINTPL_DIR')}/public/js/fileupload.js"></script>
<script>
    //  上传Logo
    $.upload("#J_sitelogo_up", {type:'question_img'}, function (result) {
        html="";
        html+="<div class=\"input_up_img logo\">";
        html+="<a href=\"__ROOT__/{:C('YTATA_IMG_CATEGORY_DIR')}5896b962c92cc.jpg\" target=\"_blank\"><img src=\"__ROOT__/{:C('YTATA_IMG_CATEGORY_DIR')}5896b962c92cc.jpg\" border=\"0\" /></a>";
        html+="<div class=\"del\" id=\"J_sitelogo_del\">删除</div>";
        html+="</div>";
        if(result.status == 1){
            //disapperTooltip("success", "图片上传成功!");
            $("#J_sitelogo").prepend(html);
            $("#J_sitelogo .input_up_img").find('a').attr('href',result.content);
            $("#J_sitelogo .input_up_img").find('img').attr('src',result.content);
            $("#J_sitelogo .input_up_btn").hide();
            $("input[name=YTATA_SITE_LOGO]").val(result.content);
        } else {
            disapperTooltip("remind", "上传失败："+result.content);
        }
    });

    //删除上传图片
    $('#J_sitelogo_del').live('click',function() {

        $("#J_sitelogo .input_up_btn").show();
        $("#J_sitelogo .input_up_img").hide();
        $("input[name=YTATA_SITE_LOGO]").val('');
    });
</script>
</body>
</html>